package com.menggudf.enums;

/**
 * 清关类型枚举类
 *
 * @author zengqingdong 2023/9/6
 */
public enum ClearanceTypeEnum {

    GLS("GLS", "GLS"),
    HUANGYOU2("皇邮2", "皇邮2"),
    TMS_DHL("TMS(DHL)", "TMS(DHL)"),
    UPS("UPS", "UPS"),
    GW_GLS("GW-GLS", "GW-GLS"),
    RoyalMail("RoyalMail", "RoyalMail"),
    DPD("DPD", "DPD"),
    DHL("DHL", "DHL"),
    YODEL("YODEL", "YODEL"),
    BILISHI_POSTAL("比利时邮政", "比利时邮政"),
    GERMANY_DPD("德国DPD", "德国DPD"),
    SEND_WINGS("派翼送", "派翼送"),
    HUALEI_ORDER("华磊订单", "华磊订单"),
    OTHER("其它", "其它");

    private String label;

    private String value;

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    ClearanceTypeEnum(String label, String value) {
        this.label = label;
        this.value = value;
    }

    /**
     *
     * @param label
     * @return
     */
    public static ClearanceTypeEnum getEumByCode(String label) {
        for (ClearanceTypeEnum ruleConditionEnum : ClearanceTypeEnum.values()) {
            if (ruleConditionEnum.getValue().equals(label)) {
                return ruleConditionEnum;
            }
        }
        return null;
    }
}
